<template>
	<el-card class="form-container">
		<el-form :model="goodsCategoryDetail" label-width="100px">
			<el-form-item label="" prop="id">
				<el-input v-model="goodsCategoryDetail.id" disabled="disabled"></el-input>
			</el-form-item>
			<el-form-item label="分类名称" prop="categoryName">
				<el-input v-model="goodsCategoryDetail.categoryName" disabled="disabled"></el-input>
			</el-form-item>
			<el-form-item label="类目父编号" prop="categoryParentCode">
				<el-input v-model="goodsCategoryDetail.categoryParentCode" disabled="disabled"></el-input>
			</el-form-item>
			<el-form-item label="分类图标/图片" prop="categoryIcon">
				<el-input v-model="goodsCategoryDetail.categoryIcon" disabled="disabled"></el-input>
			</el-form-item>
			<el-form-item label="分类级别 1.一级类目 2.二级类目 3.三级类目" prop="categoryLevel">
				<el-input v-model="goodsCategoryDetail.categoryLevel" disabled="disabled"></el-input>
			</el-form-item>
			<el-form-item label="类目排序" prop="categorySort">
				<el-input v-model="goodsCategoryDetail.categorySort" disabled="disabled"></el-input>
			</el-form-item>
			<el-form-item label="类目状态 1.启用 2.禁用" prop="categoryStatus">
				<el-input v-model="goodsCategoryDetail.categoryStatus" disabled="disabled"></el-input>
			</el-form-item>
			<el-form-item label="创建时间" prop="createTime">
				<el-input v-model="goodsCategoryDetail.createTime" disabled="disabled"></el-input>
			</el-form-item>
			<el-form-item label="修改时间" prop="updateTime">
				<el-input v-model="goodsCategoryDetail.updateTime" disabled="disabled"></el-input>
			</el-form-item>
			<el-form-item label="类目编号" prop="categoryCode">
				<el-input v-model="goodsCategoryDetail.categoryCode" disabled="disabled"></el-input>
			</el-form-item>
			<el-form-item label="模版编号:当前类目所对应的模版信息,方便用户快速录入信息" prop="templateCode">
				<el-input v-model="goodsCategoryDetail.templateCode" disabled="disabled"></el-input>
			</el-form-item>
			<el-form-item>
				<el-button @click="close(goodsCategoryDetail.categoryParentCode)">关闭</el-button>
			</el-form-item>
		</el-form>
	</el-card>
</template>

<script>
	import { findGoodsCategoryDetail } from '@/api/mall/goodsCategory'
	import eventBus from '@/utils/communication'
	export default {
		name: 'view-goodsCategory',
		data() {
			return {
				goodsCategoryDetail: {},
				
			}
		},
		created() {
			this.view(this.$route.query.id)
		},
		methods: {
			view(val) {
				findGoodsCategoryDetail(val).then(res => {
					console.log('查询返回结果', res)
					this.goodsCategoryDetail = res.data.responseData
				})
			},
			close(val) {
				eventBus.$emit('categoryParentCode',val);
				this.$router.go(-1)
			}
		}
	}
</script>

<style>
</style>
